package cn.itcast.test.Demo;

import cn.itcast.SearchApp;
import cn.itcast.dao.MerchantDao;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = SearchApp.class)
public class Demo02 {
    @Autowired
    private RedisTemplate redisTemplate;
    @Test
    public void demo01(){
        System.out.println(redisTemplate);
    }
    @Test
    public void demo02(){
        redisTemplate.opsForValue().set("key","value");
    }
    @Test
    public void demo03(){
        redisTemplate.opsForValue().get("key");
    }
}
